package com.hdu.dwh.exception;

import com.baomidou.mybatisplus.annotation.TableName;

public class DataAlreadyExistException extends Exception{
    private DataAlreadyExistException(String message) {
        super(message);
    }
    public DataAlreadyExistException(String tableName, String message) {
        this("数据已存在，无法插入重复数据，表名：" + tableName + "，" + message);
    }

    public DataAlreadyExistException(TableName tableName, String message) {
        this("数据已存在，无法插入重复数据，表名：" + tableName.value() + "，" + message);
    }
}
